//
//  MLAHttpManage.h
//  MagicLampApp
//
//  Created by Zheng on 2018/12/25.
//  Copyright © 2018 zheng.magic.lamp.app. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MagicLampApi.h"

NS_ASSUME_NONNULL_BEGIN

static NSString *kAccessToken = @"access_token";

typedef NS_ENUM(NSUInteger, MLAHttpHostType) {
    MLAHttpHostType_Api,
    MLAHttpHostType_Diancan,
    MLAHttpHostType_Jinxiaocun,
    MLAHttpHostType_Wuye
};

@interface MLAHttpManage : NSObject

+ (instancetype)defaultManager;

+ (NSURLSessionDataTask *)postHostType:(MLAHttpHostType)type api:(NSString *)api params:(nullable NSDictionary *)params success:(void(^)(id response,NSString *msg))success failure:(void(^)(void))failure;

+ (NSURLSessionUploadTask *)uploadHostType:(MLAHttpHostType)type api:(NSString *)api params:(NSDictionary *)params success:(void(^)(id response, NSString *msg))success failure:(void(^)(void))failure;

@end

NS_ASSUME_NONNULL_END
